<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      GPM-1.20.7
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-2020-04-02">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 2020-04-02
      </h4>
      <h3>
        Chapter&nbsp;12.&nbsp;System Utilities
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="fcron.html" title="Fcron-3.2.1">Prev</a>
          <p>
            Fcron-3.2.1
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="hdparm.html" title="Hdparm-9.58">Next</a>
          <p>
            Hdparm-9.58
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="sysutils.html" title=
          "Chapter&nbsp;12.&nbsp;System Utilities">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="gpm" name="gpm"></a>GPM-1.20.7
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to GPM
        </h2>
        <p>
          The <span class="application">GPM</span> (General Purpose Mouse
          daemon) package contains a mouse server for the console and
          <span class="command"><strong>xterm</strong></span>. It not only
          provides cut and paste support generally, but its library component
          is used by various software such as <span class=
          "application">Links</span> to provide mouse support to the
          application. It is useful on desktops, especially if following
          (Beyond) Linux From Scratch instructions; it's often much easier
          (and less error prone) to cut and paste between two console windows
          than to type everything by hand!
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "http://anduin.linuxfromscratch.org/BLFS/gpm/gpm-1.20.7.tar.bz2">
                http://anduin.linuxfromscratch.org/BLFS/gpm/gpm-1.20.7.tar.bz2</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download (FTP): <a class="ulink" href=
                "ftp://anduin.linuxfromscratch.org/BLFS/gpm/gpm-1.20.7.tar.bz2">
                ftp://anduin.linuxfromscratch.org/BLFS/gpm/gpm-1.20.7.tar.bz2</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: bf84143905a6a903dbd4d4b911a2a2b8
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 820 KB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 7.4 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 0.1 SBU
              </p>
            </li>
          </ul>
        </div>
        <h3>
          Additional Downloads
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Required patch: <a class="ulink" href=
                "http://www.linuxfromscratch.org/patches/blfs/svn/gpm-1.20.7-glibc_2.26-1.patch">
                http://www.linuxfromscratch.org/patches/blfs/svn/gpm-1.20.7-glibc_2.26-1.patch</a>
              </p>
            </li>
          </ul>
        </div>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/GPM">http://wiki.linuxfromscratch.org/blfs/wiki/GPM</a>
        </p>
      </div>
      <div class="kernel" lang="en" xml:lang="en">
        <h2 class="sect2">
          <a id="gpm-kernel" name="gpm-kernel"></a>Kernel Configuration
        </h2>
        <p>
          Enable the following option in the kernel configuration and
          recompile the kernel if necessary:
        </p>
        <pre class="screen">
<code class="literal">Device Drivers  ---&gt;
  Input device support ---&gt; [CONFIG_INPUT]
    &lt;*/M&gt; Mouse interface   [CONFIG_INPUT_MOUSEDEV]</code>
</pre>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of GPM
        </h2>
        <p>
          Install <span class="application">GPM</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class=
"command">sed -i -e 's:&lt;gpm.h&gt;:"headers/gpm.h":' src/prog/{display-buttons,display-coords,get-versions}.c &amp;&amp;
patch -Np1 -i ../gpm-1.20.7-glibc_2.26-1.patch &amp;&amp;
./autogen.sh                                &amp;&amp;
./configure --prefix=/usr --sysconfdir=/etc &amp;&amp;
make</kbd>
</pre>
        <p>
          This package does not come with a test suite.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class=
"command">make install                                          &amp;&amp;

install-info --dir-file=/usr/share/info/dir           \
             /usr/share/info/gpm.info                 &amp;&amp;

ln -sfv libgpm.so.2.1.0 /usr/lib/libgpm.so            &amp;&amp;
install -v -m644 conf/gpm-root.conf /etc              &amp;&amp;

install -v -m755 -d /usr/share/doc/gpm-1.20.7/support &amp;&amp;
install -v -m644    doc/support/*                     \
                    /usr/share/doc/gpm-1.20.7/support &amp;&amp;
install -v -m644    doc/{FAQ,HACK_GPM,README*}        \
                    /usr/share/doc/gpm-1.20.7</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <span class="command"><strong>./autogen.sh</strong></span>: This
          command creates the missing <span class=
          "command"><strong>configure</strong></span> script.
        </p>
        <p>
          <span class="command"><strong>install-info ...</strong></span>:
          This package installs a <code class="filename">.info</code> file,
          but does not update the system <code class="filename">dir</code>
          file. This command makes the update.
        </p>
        <p>
          <span class="command"><strong>ln -v -sfn libgpm.so.2.1.0
          /usr/lib/libgpm.so</strong></span>: This command is used to create
          (or update) the <code class="filename">.so</code> symlink to the
          library.
        </p>
      </div>
      <div class="configuration" lang="en" xml:lang="en">
        <h2 class="sect2">
          Configuring GPM
        </h2>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3">
            <a id="gpm-init" name="gpm-init"></a>
          </h3>
          <h4 class="title">
            <a id="gpm-init" name="gpm-init"></a><span class="phrase">Boot
            Script</span>
          </h4>
          <p>
            Install the <code class="filename">/etc/rc.d/init.d/gpm</code>
            init script included in the <a class="xref" href=
            "../introduction/bootscripts.html" title=
            "BLFS Boot Scripts">blfs-bootscripts-20191204</a> package.
          </p>
          <pre class="root">
<kbd class="command">make install-gpm</kbd>
</pre>
        </div>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3">
            <a id="gpm-config" name="gpm-config"></a>
          </h3>
          <h4 class="title">
            <a id="gpm-config" name="gpm-config"></a>Config Files
          </h4>
          <p>
            <code class="filename">/etc/gpm-root.conf</code> and <code class=
            "filename">~/.gpm-root</code>: The default and individual user
            <span class="command"><strong>gpm-root</strong></span>
            configuration files.
          </p>
          <p>
            <code class="filename">/etc/sysconfig/mouse</code>: This file
            contains the name of your mouse device and the protocol it uses.
            To create this file, run the following as the <code class=
            "systemitem">root</code> user:
          </p>
          <pre class="root">
<kbd class="command">cat &gt; /etc/sysconfig/mouse &lt;&lt; "EOF"
<code class="literal"># Begin /etc/sysconfig/mouse

MDEVICE="<em class="replaceable"><code>&lt;yourdevice&gt;</code></em>"
PROTOCOL="<em class="replaceable"><code>&lt;yourprotocol&gt;</code></em>"
GPMOPTS="<em class=
"replaceable"><code>&lt;additional options&gt;</code></em>"

# End /etc/sysconfig/mouse</code>
EOF</kbd>
</pre>
        </div>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3"></h3>
          <h4 class="title">
            <a id="idm140006451931600" name=
            "idm140006451931600"></a>Configuration Information
          </h4>
          <p>
            Examples of values to set <code class="envar">MDEVICE</code>,
            <code class="envar">PROTOCOL</code>, and <code class=
            "envar">GPMOPTS</code> to are:
          </p>
          <pre class="screen">
<code class="literal">MDEVICE="/dev/input/mice"
PROTOCOL="imps2"
GPMOPTS=""</code>
</pre>
          <p>
            A list of which protocol values are known can be found by running
            <span class="command"><strong>gpm -m <em class=
            "replaceable"><code>[device]</code></em> -t
            -help</strong></span>. The <code class="envar">MDEVICE</code>
            setting depends on which type of mouse you have. For example,
            <code class="filename">/dev/ttyS0</code> for a serial mouse (on
            Windows this is COM1), <code class=
            "filename">/dev/input/mice</code> is often used for USB mice and
            <code class="filename">/dev/psaux</code> for PS2 mice.
            <code class="envar">GPMOPTS</code> is the 'catch all' for any
            additional options that are needed for your hardware.
          </p>
        </div>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Programs:</strong>
              <span class="segbody">disable-paste, display-buttons,
              display-coords, get-versions, gpm, gpm-root, hltest, mev, and
              mouse-test</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Library:</strong>
              <span class="segbody">libgpm.{so.a}</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directory:</strong>
              <span class="segbody">/usr/share/doc/gpm-1.20.7</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="disable-paste" name=
                    "disable-paste"></a><span class="term"><span class=
                    "command"><strong>disable-paste</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a security mechanism used to disable the paste buffer.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="display-buttons" name=
                    "display-buttons"></a><span class="term"><span class=
                    "command"><strong>display-buttons</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a simple program that reports the mouse buttons being
                    pressed and released.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="display-coords" name=
                    "display-coords"></a><span class="term"><span class=
                    "command"><strong>display-coords</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a simple program that reports the mouse coordinates.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="get-versions" name="get-versions"></a><span class=
                    "term"><span class=
                    "command"><strong>get-versions</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is used to report the <span class=
                    "application">GPM</span> library and server versions.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="gpm-prog" name="gpm-prog"></a><span class=
                    "term"><span class=
                    "command"><strong>gpm</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a cut and paste utility and mouse server for virtual
                    consoles.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="gpm-root" name="gpm-root"></a><span class=
                    "term"><span class=
                    "command"><strong>gpm-root</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a default handler for <span class=
                    "command"><strong>gpm</strong></span>. It is used to draw
                    menus on the root window.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="hltest" name="hltest"></a><span class=
                    "term"><span class=
                    "command"><strong>hltest</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a simple sample application using the high-level
                    library, meant to be read by programmers trying to use
                    the high-level library.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="mev" name="mev"></a><span class=
                    "term"><span class="command"><strong>mev</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a program to report mouse events.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="mouse-test" name="mouse-test"></a><span class=
                    "term"><span class=
                    "command"><strong>mouse-test</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a tool for determining the mouse type and device it's
                    attached to.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libgpm" name="libgpm"></a><span class=
                    "term"><code class="filename">libgpm.{so.a}</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    contains the API functions to access the <span class=
                    "application">GPM</span> daemon.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-03-19 05:00:16 -0500
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="fcron.html" title="Fcron-3.2.1">Prev</a>
          <p>
            Fcron-3.2.1
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="hdparm.html" title="Hdparm-9.58">Next</a>
          <p>
            Hdparm-9.58
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="sysutils.html" title=
          "Chapter&nbsp;12.&nbsp;System Utilities">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
